<?php $this->headLink()->appendStylesheet($this->baseUrl('css/forum.css'))?>
<!-- Logo + Breadcrump -->
    <a href="<?php echo $this->url(array('controller'=>'forum','action'=>'index'));?>">
        <img src="<?php echo $this->baseUrl('images/forum_logo.png'); ?>" alt="Forum-Home"/>
    </a>
    <ul class="breadcrumb">You are here :
	<li>
            <a href="<?php echo $this->baseUrl('forum/index'); ?>"> Home</a>
	</li>
	<li class='active'>
            <a href="<?php echo $this->url(array('controller'=>'forum','action'=>'section','id'=>$this->sec_id));?>">
                <?php echo $this->array[0]['sec_name'];?>
            </a>
	</li>
    </ul> 
<!-- End of Logo + Breadcrump -->
<a class="btn btn-primary" href="<?php echo $this->url(array('controller'=>'forum','action'=>'addtopic','id'=>$this->sec_id));?>">New Post</a>
<!-- Category Tables  -->
<table class="table table-bordered table-hover" >
    <thead>
	<tr>
            <th style="width:80%"><?php echo $this->array[0]['sec_name'];?></th>
            <th>Replies</th>
	</tr>
    </thead>
    <tbody>
        <?php foreach ($this->topics as $key => $value){?>
        <tr>
            <td><a href="<?php echo $this->url(array('controller'=>'forum','action'=>'topic','id'=>$value['id']));?>"><?php echo $value['Subject'];?></a>
                <br/><?php echo substr( $value['body'] , 0 , 80) ;?> ....
            </td>
            <td><span class="badge"><?php echo($value["reply"][0]['count(*)'] ? $value["reply"][0]['count(*)'] : 0);?></span></td>
	</tr>
        <?php } ?>
    </tbody>
</table>